package demo3;

//手机卡类
public class PhoneCard {
    private String cardType; //卡类型
    private String cardNo; //卡号
    private String username; //用户名
    private String password; //密码
    private double balance; //账户余额
    private int minutes;        //通话时长(分钟)
    private double flux;        //上网流量

    //无参构造方法
    public PhoneCard() {
    }
    //有参构造方法
    public PhoneCard(String cardNo, String username, double balance) {
        setCardNo(cardNo);
        setUsername(username);
        setBalance(balance);
    }

    public String getCardType() {
        return cardType;
    }

    public String getCardNo() {
        return cardNo;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public double getBalance() {
        return balance;
    }

    public int getMinutes() {
        return minutes;
    }

    public double getFlux() {
        return flux;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public void setMinutes(int minutes) {
        this.minutes = minutes;
    }

    public void setFlux(double flux) {
        this.flux = flux;
    }

    //显示（卡号 + 用户名 + 当前余额）
    public void phoneCardShow(){
        System.out.println("用户:" + getUsername() + "  卡号是：" + getCardNo() + "  当前余额:" + getBalance() );
    }
}
